<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>Placeholder插件使用</title>
		<style type="text/css">
			*{
				margin: 0;
				padding: 0;
			}
			.test{
				display: inline-block;
				width: 300px;
				height: 40px;
				line-height: 40px;
				padding: 0 10px;
				font-size: 14px;
				font-family: \5FAE\8F6F\96C5\9ED1;
				margin: 20px;
				border: 1px solid #ddd;
				border-radius: 10px;
				outline: none;
				float: left;
			}
			/*修改placeholder颜色*/
			.changeColor::-webkit-input-placeholder { /* WebKit browsers */ 
				color: green; 
			} 
			.changeColor:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ 
				color: green; 
				opacity: 1;          /* 去掉火狐浏览器下默认placeholder透明效果  */
			} 
			.changeColor::-moz-placeholder { /* Mozilla Firefox 19+ */ 
				color: green; 
				opacity: 1;
			} 
			.changeColor:-ms-input-placeholder { /* Internet Explorer 10+ */ 
				color: green; 
			} 
			
			.test:focus{
				border: 1px solid #0099ff;
			}
			/*IE下placeholder文字显示颜色*/
			.colorblue{color: blue;}
		</style>
	</head>
	<body>
		<input type="text" class="normal test" placeholder="placeholder默认显示"/>
		<input type="text" class="changeColor test" placeholder="修改placeholder显示"/>
		<textarea class="more-text test" placeholder="textarea"></textarea>
	</body>
	<script src="js/jquery-1.8.3.js" type="text/javascript"></script>
	<script src="js/jquery.placeholder.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(function(){
			$(".changeColor,textarea").placeholder({customClass:'colorblue'});
		})
	</script>
</html>
